/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package haw.pr2.A2a.implementations;
import haw.pr2.A2a.interfaces.*;
/**
 *
 * @author abg659
 */
public final class UtilityclassValues {
    
    private UtilityclassValues() {}
    
    // PUBLIC CONSTANTS
    static final double KG_IN_G = 1000;
    static final double KG_IN_T = 0.001;
    static final double MPS_IN_KMH = 3.6;
    private static final double KMH_IN_MPS = 0.2777777778;
    static final double KW_IN_W = 1000;
    static final double KW_IN_MW = 0.001;
    private static final double W_IN_KW = 0.001;
    static final double S_IN_US = 1000000;
    static final double S_IN_MS = 1000;
    private static final double MS_IN_S = 0.001;
    static final double S_IN_M = 0.0166666667;
    static final double S_IN_H = 0.000277777778;
    static final double M_IN_FT = 3.2808399;
    static final double M_IN_KM = 0.001;
    static final double M_IN_NM = 1000000000;
    private static final double ACC_EARTH = 9.81;
    static final double MINSPEED = 0.0000000000001;
    static final double HOUR_IN_SEC = 3600.0;
    public static final Force ZERO_FORCE = new ForceInN(0.0);
    public static final Acc ZERO_ACC = new AccInMs(0.0);
    public static final Length ZERO_LENGTH = new LengthInM(0.0);
    public static final Mass ZERO_MASS = new MassInKg(0.0);
    public static final Speed ZERO_SPEED = new SpeedInMpS(0.0);
    public static final Power ZERO_POWER = new PowerInKw(0.0);
    public static final TimeDiff ZERO_TIMEDIFF = new TimeDiffInS(0.0);
    
    // PUBLIC FACTORIES
    public static Length lengthInM(double meters) {
        return LengthInM.valueOf(meters);
    }
    public static Speed speedInMs(double ms) {
            return new SpeedInMpS(ms);
    }
    public static Speed speedInKmH(double KmH) {
            return new SpeedInMpS(KmH*KMH_IN_MPS);
    }
    public static MassInKg massInKg(double kg) {
            return new MassInKg(kg);
    }
    public static PowerInKw powerInKw(double kw) {
            return new PowerInKw(kw);
    }
    public static PowerInKw powerInW(double w) {
            return new PowerInKw(w*W_IN_KW);
    }
    public static TimeDiffInS timeDiffInS(double s) {
            return new TimeDiffInS(s);
    }
    public static TimeDiffInS timeDiffInMs(double ms) {
            return new TimeDiffInS(ms*MS_IN_S);
    }
    public static ForceInN forceInN(double f) {
            return new ForceInN(f);
    }
    public static AccInMs accInMs(double acc) {
            return new AccInMs(acc);
    }
    public static AccInMs accEarth() {
            return new AccInMs(ACC_EARTH);
    }
    public static Speed minSpeed() {
            return new SpeedInMpS(MINSPEED);
    }
    public static TimeDiffInS hourInSec() {
            return new TimeDiffInS(HOUR_IN_SEC);
    }    
}
